<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<jsp:include page="template_header.jsp" />

            <div class="span9"> <!-- /write your content -->
            <jsp:include page="error-list.jsp" />
                <form action="sellFund.do" method = "post">
                <div class="page-header">
                    <h3>Sell Shares</h3>
                </div>    
                <table class="table table-striped" style="width: 85%">
					<c:choose>
					<c:when test="${ (empty lstCustomerFundPosition) }">
						<h3>No fund in portfolio</h3>
					</c:when>
					<c:otherwise>
					<thead>
                	<tr>
						<th style = "text-align:left; width:40%;">Fund Name</th>
						<th style = "text-align:center; width:40%;">Number of Shares</th>
						<th style = "text-align:center; width:20%;">Sell Shares</th>
					</tr>
					</thead>
					<c:forEach var="lstCustomerFundPosition" items="${lstCustomerFundPosition}">
						<tr>
							<td style = "text-align:left; width:50%;">
								${lstCustomerFundPosition.fundName}
							</td>
							<td style = "text-align:right; width:30%; padding-right:20px;">
								<input type="hidden" value = "${lstCustomerFundPosition.fundPosition}" name = "fundPosition">
								<input type="hidden" value = "${lstCustomerFundPosition.fundSymbol}" name = "fundSymbol">
								<input type="hidden" value = "${lstCustomerFundPosition.fundName}" name = "fundName">
								${lstCustomerFundPosition.fundPosition}
							</td>
							<td style = "text-align:left; width:20%;"><input type="text" name = "sellQnty"></td>
						</tr>
					</c:forEach>
					</c:otherwise>
					</c:choose>
					
					<c:choose>
					<c:when test="${ (empty lstCustomerFundPosition) }">
						
					</c:when>
					<c:otherwise>
					<tr>
	                <td colspan="3"><center><input type="submit" value="Sell"></center></td>
					</tr>
					</c:otherwise>
					</c:choose>
                </table>
                </form>
            </div> <!-- /end your content-->
            
		<jsp:include page="template_tail.jsp" />